# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=adenum
pkgver=36.fbbe14d
pkgrel=7
pkgdesc='A pentesting tool that allows to find misconfiguration through the the protocol LDAP and exploit some of those weaknesses with kerberos.'
groups=('blackarch' 'blackarch-exploitation' 'blackarch-scanner')
arch=('any')
url='https://github.com/SecuProject/ADenum'
license=('GPL3')
depends=('python' 'python-pwntools' 'python-ldap')
makedepends=('git')
source=("$pkgname::git+https://github.com/SecuProject/ADenum.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1i\#!/usr/bin/python' ADenum.py
}

package() {
  cd $pkgname

  install -Dm 755 ADenum.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

